//
//  BCVideoDetailVC.m
//  BananaChat
//
//  Created by 于洪东 on 2019/11/2.
//  Copyright © 2019 香蕉. All rights reserved.
//

#import "BCVideoDetailVC.h"

@interface BCVideoDetailVC ()

@property (nonatomic,strong) UIButton *messageButton;
@property (nonatomic,strong) UIButton *videoButton;

@end


@implementation BCVideoDetailVC
#pragma mark - ♻️life cycle
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self setupUI];
}

#pragma mark - 🔄overwrite

#pragma mark - 🚪public

#pragma mark - 🍐delegate

#pragma mark - ☎️notification

#pragma mark - 🎬event response
-(void)sendMessage:(UIButton *)sender{
    
}

-(void)sendVideo:(UIButton *)sender{
    
}

#pragma mark - 🔒private

#pragma mark - 🌲setupUI
-(void)setupUI{
    self.title = @"详情";
    
    
    [self.view addSubview:self.messageButton];
    [self.view addSubview:self.videoButton];
    
    
    CGFloat actionButtonW = 150*ScaleX;
    CGFloat margin = (SCREEN_WIDTH - actionButtonW * 2) / 3;
    
    [self.messageButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(self.view).offset(-40*ScaleX);
        make.height.mas_equalTo(44*ScaleX);
        make.width.mas_equalTo(actionButtonW);
        make.left.equalTo(self.view).offset(margin);
    }];
    
    [self.videoButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(self.view).offset(-40*ScaleX);
        make.height.mas_equalTo(44*ScaleX);
        make.width.mas_equalTo(actionButtonW);
        make.right.equalTo(self.view).offset(-margin);
    }];
    
}


#pragma mark - ☸getter and setter
-(UIButton *)messageButton{
    if (_messageButton == nil) {
        _messageButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [_messageButton setTitle:@"发消息" forState:UIControlStateNormal];
        _messageButton.titleLabel.font = [UIFont systemFontOfSize:16*ScaleX];
        [_messageButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        _messageButton.layer.cornerRadius = 22*ScaleX;
        _messageButton.backgroundColor = NTMainColor;
        [_messageButton addTarget:self action:@selector(sendMessage:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _messageButton;
}

-(UIButton *)videoButton{
    if (_videoButton == nil) {
        _videoButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [_videoButton setTitle:@"视频聊天" forState:UIControlStateNormal];
        _videoButton.titleLabel.font = [UIFont systemFontOfSize:16*ScaleX];
        [_videoButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        _videoButton.layer.cornerRadius = 22*ScaleX;
        _videoButton.backgroundColor = NTMainColor;
        [_videoButton addTarget:self action:@selector(sendVideo:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _videoButton;
}


@end









